<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pizzaonline.utils.*"%>
<jsp:include page="hautDePage.jsp" flush="true">
	<jsp:param name="title" value="Choix du menu" />
</jsp:include>
<% 
	String mode=request.getParameter("typeMenu");
	out.print("<!-- current directory"+System.getProperty("user.dir")+" -->");
%>

	<%

	if (mode!=null)
	{
		ServletContext c = this.getServletConfig().getServletContext();
		System.out.println("form: "+c.getRealPath("carte.xml"));
		// Menu Pizza - Boisson
		if (mode.equals("menu1")){
			Utils.lancerXSLT(out,"carte.xml",c.getRealPath("xsl/ajoutMenu1.xsl"));
		}
		
		// Menu Pizza - Boisson - Dessert
		else if(mode.equals("menu2")){
			Utils.lancerXSLT(out,"carte.xml",c.getRealPath("xsl/ajoutMenu2.xsl"));
		}
		
		// Menu Pizza - Salade - Boisson
		else if(mode.equals("menu3")){
			Utils.lancerXSLT(out,"carte.xml",c.getRealPath("xsl/ajoutMenu3.xsl"));
		}
		
		//Menu intégral
		else if(mode.equals("menu4")){
			Utils.lancerXSLT(out,"carte.xml",c.getRealPath("xsl/ajoutMenu4.xsl"));
		}
		
	}
	%>
	<jsp:include page="basDePage.jsp" flush="true" />
	<%
	//Utils.printFooter(out);
%>